<?php
require_once 'tpl/use/block/styleCore.php';
require_once 'tpl/use/block/pagerBar.php';
require_once 'util/xhtml.php';

function skin_ShowThreads( $fnum, $threads, $count, $start, $inc ) {
  styleHead();
  
  echo linkAt('spit.php', null, 'Echo Fora' ), '<br /><br />',
       linkAt('post.php', array( 'fnum' => $fnum ), 'New Thread');
  foreach( $threads as $thread ) {
    echo '<p>', linkAt('spit.php', array( 'type' => 'POST', 
                                          'tnum' => $thread['id'], 
                                          'start' => 0, 
                                          'inc' => 5 )
                       , "${thread['title']} - ${thread['datum']}" )
         , '</p>'
         , linkAt( 'gulp.php', array( 'type' => 'THREAD',
                                      'action[delete]' => 'true',
                                      'fnum' => $thread['fid'],
                                      'tnum' => $thread['id'] ),
                    'DELeTE' ); 

  }
  if( $count > 0 ) {
    echo linkAt( 'post.php', array( 'fnum' => $fnum ), 'New Thread' );
  }

  pagerBar("spit.php?type=THREAD&amp;", $fnum, $count, $start, $inc);
  
  styleFoot();
}
?>
